﻿/*
 * 异步
 */

Console.WriteLine("开始");
var t = GetDataAsync();
Console.WriteLine("结束");
t.Wait();

static Task GetDataAsync()
{
    return Task.Run(async () =>
    {
        await Task.Delay(2000);
        Console.WriteLine("获取到了数据");
    });
}